package dao

import "context"

const (
	TableUsers = "users"
)

type Users struct {
	Id       int64  `json:"id" structs:"id" gorm:"primary_key;column:id;type:BIGINT(16) AUTO_INCREMENT;comment:'自增id'" sql:"auto_increment;primary_key"`
	UserName string `json:"userName" structs:"username" gorm:"column:username;type:varchar(50);default:'';comment:'用户名'"`
}

func (Users) TableName() string {
	return TableUsers
}

type IUsersRepo interface {
	Add(ctx context.Context, users Users) error
	List(ctx context.Context, page, size int) ([]Users, int64, error)
}
